//
// Created by sally on 24-10-28.
//

#ifndef TASK_RESULT_H
#define TASK_RESULT_H

#include <memory>
#include "TimeTask.h"

namespace whq::timer
{

    class Task_Result
    {
    public:
        explicit Task_Result(std::shared_ptr<TimeTask> ptr);
        ~Task_Result();

        bool get_result(uint32_t milliseconds);
    private:
        // Task_Result(const Task_Result &) = default;
        // Task_Result(Task_Result &&) = default;
        // Task_Result& operator=(Task_Result &) = default;
        // Task_Result& operator=(Task_Result &&) = default;
    private:
        std::shared_ptr<TimeTask> s_tmTask;
        std::weak_ptr<TimeTask> w_tmTask;
        bool is_loop;
    };

}

#endif //TASK_RESULT_H
